Skip to content

wasmoon 2.0#131

Open
ceifa wants to merge 36 commits intomainfrom
new-apis-2
Open

wasmoon 2.0#131
ceifa wants to merge 36 commits intomainfrom
new-apis-2

Conversation

@ceifa
Copy link
Copy Markdown
Owner

@ceifa ceifa commented Jan 18, 2025

Fixes #21 #83 #127
Tried to fix #61, but emscripten have a very limited support for deno

@ceifa ceifa changed the title Change public API and improve CLI to be more close to the original Lua CLI wasmoon 2.0 Feb 18, 2025
@yuri-kiss
Copy link
Copy Markdown

is there any reason this hasn't recieved any attention

@Drago-Cuven
Copy link
Copy Markdown

should def be merged.

@neico
Copy link
Copy Markdown

neico commented Mar 29, 2026

Since this is already an api breaking change,
maybe it would be a good idea to investigate if multiple lua versions can be supported in the future and build the API with that in mind.

I mean the WASM side technically supports that already by simply changing the glue file URL when starting an instance.
But the actual wasmoon code is closely tied to the lua version being used via the submodule.
(one could probably make a compat repo later to polyfill the gaps, or leave it up to the community)

This becomes a necessity down the road, as bytecode between versions is largely incompatible,
and therefore, quick version switching would go a long way to ensure everyone's happy,
as not everyone is at liberty to just upgrade the used lua version.

it also could be a good idea to expose wasmoon's current version in some way,
maybe by exporting the version as variable that rolldown generates.
So that wasmoon consumers can easily adapt to future api changes more dynamically.

Exposing more of the globals that lua defines in luaconf.h like the version ones could also help with all that.

@neico neico mentioned this pull request Apr 6, 2026
@RodrigoDornelles
Copy link
Copy Markdown
Contributor

@neico @ceifa I wanted to suggest this, but I don't have a formal strategy. However, I think it's a great resource.

In another project, through C patches, I backport Lua 5.1 to the ABI interface of Lua 5.4. This way, the Lua version is determined at link time, regardless of the headers used by the project. I'm not sure if this is the best approach.

But this allows for multiple interchangeable WASMs with different Lua versions.

https://github.com/gly-engine/core-native-arduino/blob/3dffc1e313b87e589da5b3f748471a238f89d61d/GlyLua51.h#L56-L76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow a custom stdout and stderr Publish to https://deno.land/x ?

5 participants